package com.james.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
  * @ClassName: Order
  * @Author: JamesWang
  * @Date: 2021/4/22 14:19
  * @Description:  
  * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "sy_order")
public class Order implements Serializable {
    /**
     * 订单id
     */
    @TableId(value = "order_id", type = IdType.INPUT)
    private Integer orderId;

    /**
     * 订单编号
     */
    @TableField(value = "order_num")
    private String orderNum;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 菜品id
     */
    @TableField(value = "food_id")
    private Integer foodId;

    /**
     * 总金额
     */
    @TableField(value = "total_money")
    private BigDecimal totalMoney;

    /**
     * 数量
     */
    @TableField(value = "`count`")
    private Integer count;

    /**
     * 订单状态(0:禁用 1:正常 2:取消)
     */
    @TableField(value = "order_status")
    private Integer orderStatus;

    /**
     * 下单时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ORDER_ID = "order_id";

    public static final String COL_ORDER_NUM = "order_num";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_FOOD_ID = "food_id";

    public static final String COL_TOTAL_MONEY = "total_money";

    public static final String COL_COUNT = "count";

    public static final String COL_ORDER_STATUS = "order_status";

    public static final String COL_CREATE_TIME = "create_time";
}